<?php
/**
 * Created by PhpStorm.
 * User: ybjaa
 * Date: 2017/4/27
 * Time: 9:56
 */

namespace App\Http\Middleware;

use App\Business\DataLog\DataRequest;
use App\Extend\Test;
use App\Jobs\LogQueue;
use Closure;

/**
 * 记录请求日志的
 * Class LogRequest
 * @package App\Http\Middleware
 */
class LogRequest
{

    public function handle($request, Closure $next)
    {
        //记录http请求
        /*$log=new DataRequest();
        $log->InstializeStart();
        $log->Insert();*/
        dispatch(new LogQueue(new DataRequest()));

        return $next($request);
    }

}